package com.srk.JAXB.swt.demo;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

import com.srk.JAXB.demo.SrkJAXB;

public class SrkJAXBswt {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setText("SWT JAXB");

		shell.setLayout(new FillLayout());

		Label label = new Label(shell, SWT.NONE);
		label.setText("HEllo                  ");

		Label label1 = new Label(shell, SWT.BORDER|SWT.BOTTOM);
		label1.setText("Unmarshalling from XML    Book Name    :          " + SrkJAXB.marshell().getBook().get(0).getName());

		;
		
		shell.pack();
		shell.open();
		System.out.println("Hello");
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
	}

}
